# # random()函数
# import random
# print(random.random())

# # randint()函数
# import random
# print(random.randint(1,8))

# # choice()函数
# import random
# name_li = ["小坤","小刚","小明","小晴"]
# print(random.choice(name_li))

# # time()函数
# import time
# before = time.time()
# result = pow(1000,10000)
# after = time.time()
# interval = after - before
# print(f"运行时长为{interval}秒")

# # sleep()函数
# import random,time
# name_li1 = ["小坤","小刚","小明","小晴","小超"]
# name_li2 = []
# for i in range(len(name_li1)):
#     people = random.choice(name_li1)
#     name_li1.remove(people)
#     name_li2.append(people)
#     time.sleep(2)
#     print(f"此时成员有{name_li2}")

# # localtime()函数
# import time
# print(time.localtime())
# print(time.localtime(34.54))

# # strftime()函数
# import time
# print(time.strftime('%Y-%b-%d %H:%M:%S'))

# # asctime()函数
# import time
# print(time.asctime())

# # asctime()函数
# import  time
# str_dt = "2023-02-25 17:43:54"
# # 将时间字符串转换成时间元组
# time_struct = time.strptime(str_dt,"%Y-%m-%d %H:%M:%S")
# # 将时间元组转换成时间戳
# timestamp = time.mktime(time_struct)
# print(timestamp)

# # module_demo
# age = 17
# def introduce():
#     print(f"my name is itheima,I'm {age} years old this year.")
# import module_demo
# module_demo.introducs()
# print(module_demo.age)
# from module_demo import introduce
# introduce()

# # module_demo
# import sys
# print(sys.path)
# sys.path.append("E:\pythonProject\test")
# import  module_demo
# module_demo.introduce()

# __all__变量
# def add(a,b):
#     return a+b
# def subtract(a,b):
#     return a - b
# def multiply(a,b):
#     return a * b
# def divide(a,b):
#     if(b):
#         return a / b
#     else:
#         print("error")
# __all__ = ["add","subtract"]
# from calc import *
# print(add(2,3))
# print(subtract(2,3))
# print(multiply(2,3))
# print(divide(2,3))
#
# # __name__变量
# if __name__ =="__main__":
#     print(multiply(3,4))
#     print(divide(3,4))
# else:
#     print(__name__)

# import package_demo.module_demo
# package_demo.module_demo.add(2,3)
#
# from package_demo import  import module_demo
# module_demo.add(2,3)




